﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleAppIObservet
{
	class Program
	{
		static void Main(string[] args)
		{
			Guid guid;
			if (Guid.TryParse("1d5f01a7-b24c-4078-a614-1b393286341a", out guid))
			{
				Console.Write(guid.ToString());
			}

			List<Pers> list = new List<Pers>();

			for (int i = 0; i < 10; i++)
			{
				list.Add(new Pers() { Name = string.Format("Name{0}", i) });
			}

			Pers it = (from item in list
					   where item.Name == "Name5"
					   select item).FirstOrDefault();

			if (it!= null)
			{
				it.Name = "qwerty";
			}

			foreach (Pers p in list)
				Console.WriteLine(p.Name);


				System.Threading.Thread.Sleep(3000);
		}
	}

	public class Pers
	{
		public string Name
		{
			get;
			set;
		}
	}
}
